BOOL CALLBACK enumGameControlCallback(const DIDEVICEINSTANCE* device, VOID* _joystickIDs) {
	vector<GUID>* joystickIDs = (vector<GUID>*) _joystickIDs;
	joystickIDs->push_back(device->guidInstance);
	return DIENUM_CONTINUE;
}

// this sweet little thing will accomplish my mapping
struct actions {
	
};
//


class InputWrapper {
public:
	HWND window;
	LPDIRECTINPUT8 DirectInputObject;

	// for now, I really only want one of each of these.
	Keyboard keyboard;
	Mouse mouse;
	Gamepad gamepad;


	void setup (HWND handle) {
		window = handle;

		// create the "DIRECTINPUT8" thingy, whatever the fuck that is
		DirectInput8Create( GetModuleHandle(null), 
							DIRECTINPUT_VERSION, 
							IID_IDirectInput8, 
							(void**)&DirectInputObject, 
							null);


		// initialize the system mouse and keyboard. Assume that both are present.
		keyboard.setup(window, DirectInputObject);
		mouse.setup(window, DirectInputObject);


		// gather a list of all connected gamepads
		vector<GUID> gamepadList;
		DirectInputObject->EnumDevices( DI8DEVCLASS_GAMECTRL, 
										enumGameControlCallback, 
										&gamepadList, 
										DIEDFL_ATTACHEDONLY );


		// and, as long as there was one, set up gamepad
		if (gamepadList.size() > 0)
			gamepad.setup(window, DirectInputObject, gamepadList[0]);
		
	}
	//

	void update () {
		keyboard.update();
		mouse.update();
		gamepad.update();
	}
	//

	void shutDown () {
		keyboard.shutdown();
		mouse.shutdown();
		gamepad.shutdown();

		if (DirectInputObject != null)
			DirectInputObject->Release();
	}
	//



	// actions
	// move up down left right
	// fire up down left right

};





